package com.pluto.product.service.impl;
import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

import com.pluto.product.bean.Product;
import com.pluto.product.service.ProductService;
import org.springframework.stereotype.Service;

@Service
public class ProductServiceImpl implements ProductService {

    @Override
    public Product getProductById(Long productId) {
		// try {
		// 	// 模拟 order 调用超时
		// 	TimeUnit.SECONDS.sleep(100);
		// } catch (InterruptedException e) {
		// 	e.printStackTrace();
		// }
        Product product = new Product();
        product.setId(productId);
        product.setProductName("苹果-"+productId);
        product.setPrice(new BigDecimal("99"));
        product.setNum(2);
        return product;
    }
}
